//
//  LoadingView.m
//  blackjack
//
//  Created by Thi Nguyen Tran on 3/25/10.
//  Copyright 2010 Epsilon. All rights reserved.
//

#import "LoadingView.h"


@implementation LoadingView

@synthesize delegate;

- (id)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        UIImage * img = [UIImage imageNamed:@"loading_bg.png"];
		[self setImage:img];
		[self setUserInteractionEnabled:YES];
		
		label = [[UILabel alloc] initWithFrame:CGRectMake(40, 336, 260, 20)];
		[label setFont:[UIFont fontWithName:@"Georgia" size:20]];
		[label setText:@"Touch screen to continue..."];
		[label setTextAlignment:UITextAlignmentCenter];
		[label setBackgroundColor:[UIColor clearColor]];
		[label setTextColor:[UIColor whiteColor]];
		[self addSubview:label];
    }
    return self;
}

- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
	[delegate endLoading];
}


- (void)dealloc {
    [super dealloc];
}


@end
